package com.liu.activiti.pojo.http;

import com.liu.activiti.enums.HttpStateEnum;
import lombok.Data;

import java.util.Objects;

@Data
public class ApiResponse<T> {
    private boolean success;
    private Integer code;
    private String message;
    private T data;

    public ApiResponse(String message, T data, Integer code) {
        this.success = Objects.equals(code, HttpStateEnum.SUCCEED.getCode());
        this.message = message;
        this.data = data;
        this.code = code;
    }

}
